From 93f0af44928319586b2153d3b0a7e5d3237c2e5b Mon Sep 17 00:00:00 2001 From: "djm@kirby.fc.hp.com" Date: Thu, 17 Feb 2005 19:07:08 +0000 Subject: [PATCH] bitkeeper revision 1.1218 (4214eb5c50HeO5ayekYo8U0171lEmA) mkbuildtree, setup.c: update to match serial changes in common serial.h: new file --- .rootkeys | 1 + xen/arch/ia64/patch/linux-2.6.7/setup.c | 32 +++++++-- xen/arch/ia64/tools/mkbuildtree | 5 +- xen/include/asm-ia64/serial.h | 91 +++++++++++++++++++++++++ 4 files changed, 122 insertions(+), 7 deletions(-) create mode 100644 xen/include/asm-ia64/serial.h diff --git a/.rootkeys b/.rootkeys index 37ed52e46b..e06a73ac3c 100644 --- a/.rootkeys +++ b/.rootkeys @@ -1087,6 +1087,7 @@ 421098b72bPUyviWloEAIB85dGCm2Q xen/include/asm-ia64/privop.h 421098b7Z6OwjZnrTZkh34DoDfcjrA xen/include/asm-ia64/regionreg.h 421098b707cY5YluUcWK5Pc-71ETVw xen/include/asm-ia64/regs.h +4214e2f3fbO_n9Z1kIcBR83d7W4OJw xen/include/asm-ia64/serial.h 421098b7czhvyPGFa5nskL0N4vNvFw xen/include/asm-ia64/shadow.h 421098b7GkWOnlzSmPvNAhByOSZ1Dw xen/include/asm-ia64/time.h 421098b7FK3xgShpnH0I0Ou3O4fJ2Q xen/include/asm-ia64/tlb.h diff --git a/xen/arch/ia64/patch/linux-2.6.7/setup.c b/xen/arch/ia64/patch/linux-2.6.7/setup.c index c75ebf8df2..05de3112ee 100644 --- a/xen/arch/ia64/patch/linux-2.6.7/setup.c +++ b/xen/arch/ia64/patch/linux-2.6.7/setup.c @@ -1,5 +1,5 @@ ---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/setup.c 2004-06-15 23:18:58.000000000 -0600 -+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/setup.c 2004-11-11 17:08:30.000000000 -0700 +--- /home/djm/linux-2.6.7/arch/ia64/kernel/setup.c 2004-06-15 23:18:58.000000000 -0600 ++++ arch/ia64/setup.c 2005-02-17 10:53:00.000000000 -0700 @@ -21,6 +21,9 @@ #include @@ -58,7 +58,21 @@ /* * Filter incoming memory segments based on the primitive map created from the boot * parameters. Segments contained in the map are removed from the memory ranges. A -@@ -285,7 +298,9 @@ +@@ -280,23 +293,40 @@ + } + #endif + ++#ifdef XEN ++void __init ++early_setup_arch(void) ++{ ++ efi_init(); ++ io_port_init(); ++} ++#endif ++ + void __init + setup_arch (char **cmdline_p) { unw_init(); @@ -68,7 +82,13 @@ *cmdline_p = __va(ia64_boot_param->command_line); strlcpy(saved_command_line, *cmdline_p, sizeof(saved_command_line)); -@@ -297,6 +312,10 @@ + ++#ifndef XEN + efi_init(); + io_port_init(); ++#endif + + #ifdef CONFIG_IA64_GENERIC machvec_init(acpi_get_sysname()); #endif @@ -79,7 +99,7 @@ #ifdef CONFIG_ACPI_BOOT /* Initialize the ACPI boot-time table parser */ acpi_table_init(); -@@ -413,6 +432,9 @@ +@@ -413,6 +443,9 @@ sprintf(cp, " 0x%lx", mask); } @@ -89,7 +109,7 @@ seq_printf(m, "processor : %d\n" "vendor : %s\n" -@@ -667,6 +689,8 @@ +@@ -667,6 +700,8 @@ void check_bugs (void) { diff --git a/xen/arch/ia64/tools/mkbuildtree b/xen/arch/ia64/tools/mkbuildtree index 98f49a27f4..883dd91b8a 100644 --- a/xen/arch/ia64/tools/mkbuildtree +++ b/xen/arch/ia64/tools/mkbuildtree @@ -226,7 +226,6 @@ softlink include/asm-ia64/rwsem.h include/asm-ia64/rwsem.h softlink include/asm-ia64/scatterlist.h include/asm-ia64/scatterlist.h softlink include/asm-ia64/sections.h include/asm-ia64/sections.h softlink include/asm-ia64/semaphore.h include/asm-ia64/semaphore.h -softlink include/asm-ia64/serial.h include/asm-ia64/serial.h softlink include/asm-ia64/sigcontext.h include/asm-ia64/sigcontext.h softlink include/asm-ia64/signal.h include/asm-ia64/signal.h softlink include/asm-ia64/smp.h include/asm-ia64/smp.h @@ -241,6 +240,10 @@ softlink include/asm-ia64/unistd.h include/asm-ia64/unistd.h softlink include/asm-ia64/unwind.h include/asm-ia64/unwind.h softlink include/asm-ia64/ustack.h include/asm-ia64/ustack.h +#rename this one because xen/include/asm/serial.h already exists +#there is only one use of it that must be patched -- arch/ia64/setup.c +#softlink include/asm-ia64/serial.h include/asm-ia64/asmserial.h + # xen/include/asm-ia64/linux/*.h (== linux/include/linux/*.h) cp_patch include/linux/bootmem.h include/asm-ia64/linux/bootmem.h bootmem.h diff --git a/xen/include/asm-ia64/serial.h b/xen/include/asm-ia64/serial.h new file mode 100644 index 0000000000..7011963fb1 --- /dev/null +++ b/xen/include/asm-ia64/serial.h @@ -0,0 +1,91 @@ +#ifndef __ASM_SERIAL_H__ +#define __ASM_SERIAL_H__ + +#include +#include +#include +#include + +#if 1 +#define arch_serial_putc(_uart, _c) \ + ( platform_is_hp_ski() ? (ia64_ssc(c,0,0,0,SSC_PUTCHAR), 1) : \ + ( longs_peak_putc(c), 1 )) +#else +#define arch_serial_putc(_uart, _c) \ + ( platform_is_hp_ski() ? (ia64_ssc(c,0,0,0,SSC_PUTCHAR), 1) : \ + ( (inb((_uart)->io_base + LSR) & LSR_THRE) ? \ + (outb((_c), (_uart)->io_base + THR), 1) : 0 )) +#endif + + +#define OPT_COM1_STR "115200" +#define OPT_COM2_STR "" + +/* Register offsets */ +#define RBR 0x00 /* receive buffer */ +#define THR 0x00 /* transmit holding */ +#define IER 0x01 /* interrupt enable */ +#define IIR 0x02 /* interrupt identity */ +#define FCR 0x02 /* FIFO control */ +#define LCR 0x03 /* line control */ +#define MCR 0x04 /* Modem control */ +#define LSR 0x05 /* line status */ +#define MSR 0x06 /* Modem status */ +#define DLL 0x00 /* divisor latch (ls) (DLAB=1) */ +#define DLM 0x01 /* divisor latch (ms) (DLAB=1) */ + +/* Interrupt Enable Register */ +#define IER_ERDAI 0x01 /* rx data recv'd */ +#define IER_ETHREI 0x02 /* tx reg. empty */ +#define IER_ELSI 0x04 /* rx line status */ +#define IER_EMSI 0x08 /* MODEM status */ + +/* FIFO control register */ +#define FCR_ENABLE 0x01 /* enable FIFO */ +#define FCR_CLRX 0x02 /* clear Rx FIFO */ +#define FCR_CLTX 0x04 /* clear Tx FIFO */ +#define FCR_DMA 0x10 /* enter DMA mode */ +#define FCR_TRG1 0x00 /* Rx FIFO trig lev 1 */ +#define FCR_TRG4 0x40 /* Rx FIFO trig lev 4 */ +#define FCR_TRG8 0x80 /* Rx FIFO trig lev 8 */ +#define FCR_TRG14 0xc0 /* Rx FIFO trig lev 14 */ + +/* Line control register */ +#define LCR_DLAB 0x80 /* Divisor Latch Access */ + +/* Modem Control Register */ +#define MCR_DTR 0x01 /* Data Terminal Ready */ +#define MCR_RTS 0x02 /* Request to Send */ +#define MCR_OUT2 0x08 /* OUT2: interrupt mask */ + +/* Line Status Register */ +#define LSR_DR 0x01 /* Data ready */ +#define LSR_OE 0x02 /* Overrun */ +#define LSR_PE 0x04 /* Parity error */ +#define LSR_FE 0x08 /* Framing error */ +#define LSR_BI 0x10 /* Break */ +#define LSR_THRE 0x20 /* Xmit hold reg empty */ +#define LSR_TEMT 0x40 /* Xmitter empty */ +#define LSR_ERR 0x80 /* Error */ + +/* These parity settings can be ORed directly into the LCR. */ +#define PARITY_NONE (0<<3) +#define PARITY_ODD (1<<3) +#define PARITY_EVEN (3<<3) +#define PARITY_MARK (5<<3) +#define PARITY_SPACE (7<<3) + +#define RXBUFSZ 32 +#define MASK_RXBUF_IDX(_i) ((_i)&(RXBUFSZ-1)) + +#define UART_ENABLED(_u) ((_u)->baud != 0) +#define DISABLE_UART(_u) ((_u)->baud = 0) + +/* 'Serial handles' are comprise the following fields. */ +#define SERHND_IDX (1<<0) /* COM1 or COM2? */ + +unsigned char irq_serial_getc(int handle); + +void serial_force_unlock(int handle); + +#endif /* __ASM_SERIAL_H__ */ -- 2.30.2